<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    <title>我的课程</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
        }
        
        body {
            max-width: 750px;
            margin: 0 auto;
            color: #333;
            background-color: #f5f5f5;
        }
        
        .header {
            background-color: #2196F3;
            color: white;
            padding: 15px;
            text-align: center;
            font-size: 18px;
            font-weight: bold;
            position: relative;
        }
        
        .tabs {
            display: flex;
            background-color: #2196F3;
        }
        
        .tab {
            flex: 1;
            text-align: center;
            padding: 12px 0;
            color: rgba(255, 255, 255, 0.7);
            font-size: 16px;
            cursor: pointer;
            transition: all 0.3s;
        }
        
        .tab.active {
            color: white;
            border-bottom: 3px solid white;
        }
        
        .content {
            padding: 15px;
        }
        
        .course-list {
            display: none;
        }
        
        .course-list.active {
            display: block;
        }
        
        .course-item {
            background-color: white;
            border-radius: 8px;
            padding: 15px;
            margin-bottom: 12px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }
        
        .course-name {
            font-size: 16px;
            font-weight: bold;
            margin-bottom: 8px;
        }
        
        .course-duration {
            color: #666;
            font-size: 14px;
            margin-bottom: 8px;
        }
        
        .course-price {
            color: #2196F3;
            font-size: 16px;
            font-weight: bold;
        }
        
        .empty-tip {
            text-align: center;
            padding: 50px 0;
            color: #999;
            font-size: 14px;
        }
    </style>
</head>
<body>
    <div class="header">我的课程</div>
    
    <div class="tabs">
        <div class="tab active" onclick="switchTab(0)">我购买的</div>
        <div class="tab" onclick="switchTab(1)">我发布的</div>
    </div>
    
    <div class="content">
        <!-- 我购买的课程列表 -->
        <div class="course-list active" id="purchased-courses">
            <div class="course-item">
                <div class="course-name">JavaScript高级程序设计</div>
                <div class="course-duration">时长: 36小时</div>
                <div class="course-price">¥199.00</div>
            </div>
            <div class="course-item">
                <div class="course-name">Vue.js从入门到实战</div>
                <div class="course-duration">时长: 24小时</div>
                <div class="course-price">¥129.00</div>
            </div>
            <div class="course-item">
                <div class="course-name">React Native跨平台开发</div>
                <div class="course-duration">时长: 30小时</div>
                <div class="course-price">¥159.00</div>
            </div>
        </div>
        
        <!-- 我发布的课程列表 -->
        <div class="course-list" id="published-courses">
            <div class="course-item">
                <div class="course-name">HTML5与CSS3基础教程</div>
                <div class="course-duration">时长: 20小时</div>
                <div class="course-price">¥99.00</div>
            </div>
            <div class="course-item">
                <div class="course-name">Node.js后端开发</div>
                <div class="course-duration">时长: 28小时</div>
                <div class="course-price">¥149.00</div>
            </div>
        </div>
    </div>
    
    <script>
        function switchTab(index) {
            // 切换选项卡样式
            const tabs = document.querySelectorAll('.tab');
            tabs.forEach((tab, i) => {
                if (i === index) {
                    tab.classList.add('active');
                } else {
                    tab.classList.remove('active');
                }
            });
            
            // 切换内容显示
            const purchasedCourses = document.getElementById('purchased-courses');
            const publishedCourses = document.getElementById('published-courses');
            
            if (index === 0) {
                purchasedCourses.classList.add('active');
                publishedCourses.classList.remove('active');
            } else {
                purchasedCourses.classList.remove('active');
                publishedCourses.classList.add('active');
            }
        }
    </script>
</body>
</html>